package com.jier.service.impl;

import com.jier.dao.SystemUserRoleDao;
import com.jier.entities.SystemUserRole;
import com.jier.service.ISystemUserRoleService;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

/**
 * 系统用户-角色业务实现类
 *
 * @author jie_r
 * @date 2018/03/14
 */
@Service
public class SystemUserRoleServiceImpl extends BaseServiceImpl<SystemUserRoleDao, SystemUserRole> implements ISystemUserRoleService {
    @Override
    public SystemUserRole getSystemUserRole(Integer systemUserId) throws Exception {
        Example example = getExample();
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("systemUserId", systemUserId);
        return getUniqueByExample(example);
    }
}
